package com.kinghunt.misp.web.controller.regionx;

import com.bygoodtech.kings.common.dto.ApiResult;
import com.kinghunt.misp.common.dto.regionx.SysRegionDTO;
import com.kinghunt.misp.service.api.regionx.SysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 地区管理
 *
 * @Author ciaran
 * @Date 2023/7/13 21:58l
 */
@RestController
@RequestMapping("/api/region/")
public class RegionController {

    @Autowired(required = false)
    private SysRegionService regionService;

    /**
     * 查询地区表
     */
    @GetMapping("getSysRegionByParentId")
    public ApiResult<List<SysRegionDTO>> getSysRegionByParentId(String id) {
        return regionService.getSysRegionByParentId(id);
    }

}
